import React from 'react'
import Head from 'next/head'
import Invoke from "../api/invoke.js"
import Footer from '../components/footer'
import { connect } from 'react-redux';
import Counter from '../containers/home/counter';
const mapStateToProps = state => ({
  introduction: state.home.counter.introduction,
});

 class Profile extends React.Component {
  static  async getInitialProps  (props) {
    return {data:await Invoke.Company.getCompany({})}
  }
  constructor (props) {
    super(props)
  }
  
  // handling escape close
  componentDidMount () {
      
  }
  componentWillUnmount () {
   
  }

  
  render () {
    const {data,introduction} = this.props
    console.log(444,this.props)
    return (
      <div className='list'>
         <Head>
           <title>看准网-查工资|聊面试|评公司|搜职位|中国领先的职场信息平台</title>
        <meta name="keywords" content="看准网,查工资,搜职位,聊面试,评公司,职场信息"/>
        <meta name="description" content="看准网★中国领先的职场信息平台,专注于公司评论,晒工资,工资待遇,面试,公司福利等.您可以在看准网上匿名分享您的职业信息."/>
       </Head>
       <div>
         {data.data.introduction}
         {introduction}
       </div>
       <Counter />
        <Footer />
      </div>
    )
  }
}

export default connect(mapStateToProps)(Profile)
